#include "gofgame/common/resource/TextureResource.h"

using namespace gofgame::common::resource;

TextureResource::TextureResource(const char *imageName) {
	this->imageName = imageName;
}

void TextureResource::onCollectFileNames(FileNameCollector &fnc) {
	fnc.collect(this->imageName);
}

void TextureResource::onLoad() {
	this->value = CCTextureCache::sharedTextureCache()->addImage(this->imageName.c_str());
}
